<?php $this->_extends(Helper_Store::layout()); ?>
<?php $this->_block('title'); 
	$title='';
	if(isset($navigation)) foreach($navigation as $n){
		$title=$n['title'].' '.$title;
	}
	echo $title;
?>- <?=_L('product_list')?> -  <?=$store['name']?> <?php $this->_endblock(); ?>
<?php $this->_block('contents'); 
//Helper_Util::$MaxImgSize=array('with'=>120,'height'=>160);
$imgresize=array('width'=>Store_Configs::get('simallimgwidth'),'height'=>Store_Configs::get('simallimgheight'));
?>
<div id="MainWrap">

	<div id="InnerLeftColumn">
		<?php $this->_element('categories'); ?>
		<?php $this->_element('tags'); ?>
	</div>

	<div id="InnerRightColumn">
	
	<div class="Navigation">
		<span><a href="<?=_url('')?>" alt="" title=""><?=_L('index')?></a></span>
		<span>&raquo;</span>
		<?php if(isset($navigation)) foreach($navigation as $n):?>
		<span><a href="<?=$n['url']?>" alt="<?=$n['title']?>" title="<?=$n['title']?>"><?=$n['title']?></a></span>
		<span>&raquo;</span> 
		<?php endforeach;?>
		<span class="now"> </span>
	</div>

	<div class="title">
	
	<div>
		<?php $this->_control('pagination','',array('pagination'=>$pager,'url_args'=>$url_args)) ?>
	</div>
	<br  />
	<div style="clear:both"></div>
	
	<div class="ItemsWarp clearfix" >
	<?php if(count($goods)): foreach($goods as $g):
		if(strlen($g->img)){
			$imgurl=$_BASE_DIR.Q::ini('app_config/PRODUCTIMG_BASEDIR').'/small/'.$g->img;
		}elseif(strlen($g->imgurl)){
			//$imgresize=Helper_Util::ratioImgSize($g->imgurl);
			$imgurl=$g->imgurl;
		}
	?>
	<div class="items-list" product="">
	<table cellspacing="0" cellpadding="0" border="0" width="100%">
	<tr>
	<td class="goodpic" valign="middle" style="width: 120px;">
	<a href="<?=_url('product',array('goods_id'=>$g->goods_id))?>" style="margin: 0px auto; overflow: hidden; width: 120px; height: 160px; text-align: center; vertical-align: middle; line-height: 160px;" >
	<img alt="" src="<?=$imgurl?>" width="<?=$imgresize['width']?>" height="<?=$imgresize['height']?>" />
	
	</a>
	</td>
	<td class="goodinfo">
	<h6>
	<a class="entry-title" title="" href="<?=_url('product',array('goods_id'=>$g->goods_id))?>"><?=$g->title?></a>
	</h6>
	<br />
	<?php if($g->shipping_free): ?>
		<font color="#FF0000"><b><?=_L('goods/freeshipping')?></b></font>
	<?php endif;?> 
	</td>
	<td class="price_button" width="250">
	<ul>
	<?php if(($g->market_price>0)&&($g->market_price>$g->price)):  $saved=$g->market_price-$g->price;?>
	<li>
		<span class="mktprice1"><?=Helper_currency::fetch($g->market_price,$g->currency)?></span>
	</li>
	<?php endif;?>
	<li>
		<span class="price1"><?=Helper_currency::fetch($g->price,$g->currency)?></span>
	</li>
	<?php if(isset($savedprice)):?>
	<li style="padding-left: 4px; padding-top: 8px;">
		<span class="saveprice1"><?=Helper_currency::fetch($saved,$g->currency)?></span>
	</li>
	<?php endif;?>
	</ul>
	<ul class="button">
		<li class="addcart buy-select" style="z-index: 1000;">
		<div class="buy-select-list note" style="display: none;"></div>
		</li>
	</ul>
	</td>
	</tr>
	</tbody>
	</table>
	</div>
	<?php endforeach; else:?>
		<div><?=_L('no_product')?></div>
	<?php endif;?>
	
	<div>
		<?php $this->_control('pagination','',array('pagination'=>$pager,'url_args'=>$url_args)) ?>
	</div>
	<div style="clear:both"></div>
	</div>
	</div>
	</div>
	
	</div></div>
	<div style="clear:both"></div>
<?php $this->_endblock('contents'); ?>
